<?php include "../../classes.inc" ?>

<?php include "../../constants.inc" ?>

<?php session_start(); ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Tornooien</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../../assets/css/default.css" rel="stylesheet" type="text/css">

<script language="JavaScript" src="../../assets/js/ajax.js" />

</script>

</head>



<body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" class="default">



<table border="0" cellpadding="0" cellspacing="0" width="100%">

    <tr>

        <td>

            <table border="0" cellpadding="0" cellspacing="0">

                <tr>

                    <td width="7">

                        <img src="../../assets/images/spacer.gif" height="1" width="7" ALT="">

                    </td>

                    <td width="150" align="left"><img src="../../assets/images/headerbar_kerst.gif" alt="" ></td>

                </tr>

                <tr>

                    <td colspan="2" height="12"><img src="../../assets/images/spacer.gif" alt="" height="12" width="1"></td>

                </tr>

            </table>

        </td>

        <td align="right" valign="top">

		<br/>

        <?php

  		if ( isset($_SESSION['user']) ) {

			$user = $_SESSION['user'];

		?>

			<a href="../../logout.php?redirect=/tornooien/zt-php/zt.php"><img src="../../assets/images/24x24/plain/exit.gif" border="0" alt="Log uit"></a>

			<br>&nbsp;<br>

			<span class="headerSmall">User <?=$_SESSION['user']->name?> logged in at <?=$user->login_date?>.</span>



	    <?php

	        } else {

	            if ( isset($_POST['username']) && isset($_POST['password']) ) {

	                $username = $_POST['username'];

	                $password = $_POST['password'];



	                mysql_connect(DB_SERVER, DB_USER, DB_PWD);

	                mysql_select_db(DB_CATALOG);

	                $query = sprintf("SELECT user_id, club_id FROM user WHERE (zt_captain = 1 OR club_id = 100) AND username = '%s' AND password = '%s'",

	                    mysql_real_escape_string($username), mysql_real_escape_string($password));

	                $result = mysql_query($query);

	                $num_rows = mysql_num_rows($result);



	                if ($num_rows == 1) {

	                    $user = new User($username);

	                    $row = mysql_fetch_assoc($result);

	                    $user->user_id = $row['user_id'];

	                    $user->club_id = $row['club_id'];

	                    $_SESSION['user'] = $user;

	    ?>

	                    <a href="../../logout.php?redirect=/tornooien/zt-php/zt.php"><img src="../../assets/images/24x24/plain/exit.gif" border="0" alt="Log uit"></a>

	                    <br>&nbsp;<br>

	                    <span class="headerSmall">User <?=$_SESSION['user']->name?> logged in at <?=$user->login_date?>.</span>

	    <?

	                } else {

	    ?>

            <span class="headerSmall" style="color:#FFFFCC">Gebruikersnaam '<?=$username?>' en/of paswoord ongeldig, probeer opnieuw.</span>

            <form name="login" action="" method="post" class="login">

				<input id="username" name="username" type="text" size="20" value="gebruikersnaam"

					onFocus="javascript:document.getElementById('username').value=''" />

				<input id="password" name="password" type="password" size="20" value="paswoord"

					onFocus="javascript:document.getElementById('password').value=''" />

				<input type="submit" value="inloggen" />

			</form>

	    <?php

	                }



	                mysql_free_result($result);



	            } else {

	    ?>

	                <form name="login" action="" method="post" class="login">

	                    <input id="username" name="username" type="text" size="20" value="gebruikersnaam"

	                        onFocus="javascript:document.getElementById('username').value=''" />

	                    <input id="password" name="password" type="password" size="20" value="paswoord"

	                        onFocus="javascript:document.getElementById('password').value=''" />

	                    <input type="submit" value="inloggen" />

	                </form>

	    <?php

	            }

	        }

	    ?>

</td>

		<td>&nbsp;</td>

	</tr>

</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">

    <tr>

        <td align="left">

            <table border="0" cellpadding="0" cellspacing="0">

                <tr>

                    <td rowspan="2" width="7"><img src="../../assets/images/spacer.gif" alt="" height="1" width="7"></td>



					<td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_l.gif" height="14" width="14" ALT=""></td>

					<td nowrap rowspan="2" class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt="" height="3" width="3"><br/><a href="/newsbox.php" target="_top"><span class="tabName">Nieuwsbox</span></a></td>

					<td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_r.gif" height="14" width="14" ALT=""></td>

					<td rowspan="2" width=2><img src="../../assets/images/spacer.gif" alt="" height="1" width="2"></td>



					<td valign="top"><img src="../../assets/images/tabcorners/re_FFFFFF_l.gif" height="14" width="14" ALT=""></td>

                    <td nowrap rowspan="2" class="activeSpacer"><img src="../../assets/images/spacer.gif" alt="" height="3" width="3"><br/><a href="/tornooien/tornooien.html" target="_top"><span class="tabName">Tornooien</span></a></td>

                    <td valign="top"><img src="../../assets/images/tabcorners/re_FFFFFF_r.gif" height="14" width="14" ALT=""></td>

                    <td rowspan="2" width=2><img src="../../assets/images/spacer.gif" alt="" height="1" width="2"></td>



					<td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_l.gif" height="14" width="14" ALT=""></td>

                    <td nowrap rowspan="2" class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt="" height="3" width="3"><br/><a href="/bestuur/bestuur.php" target="_top"><span class="tabName">Bestuur</span></a></td>

                    <td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_r.gif" height="14" width="14" ALT=""></td>

                    <td rowspan="2" width=2><img src="../../assets/images/spacer.gif" alt="" height="1" width="2"></td>



					<td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_l.gif" height="14" width="14" ALT=""></td>

                    <td nowrap rowspan="2" class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt="" height="3" width="3"><br/><a href="/advalvas/index.html" target="_top"><span class="tabName">Ad Valvas</span></a></td>

                    <td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_r.gif" height="14" width="14" ALT=""></td>

                    <td rowspan="2" width=2><img src="../../assets/images/spacer.gif" alt="" height="1" width="2"></td>



					<td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_l.gif" height="14" width="14" ALT=""></td>

                    <td nowrap rowspan="2" class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt="" height="3" width="3"><br/><a href="http://www.frbe-kbsb.be/EloHist/FRBE_Fiche.php" target="_blank"><span class="tabName">ELO</span></a></td>

                    <td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_r.gif" height="14" width="14" ALT=""></td>

                    <td rowspan="2" width=2><img src="../../assets/images/spacer.gif" alt="" height="1" width="2"></td>



					<td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_l.gif" height="14" width="14" ALT=""></td>

                    <td nowrap rowspan="2" class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt="" height="3" width="3"><br/><a href="/clubs/clubs.php" target="_top"><span class="tabName">Clubs</span></a></td>

                    <td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_r.gif" height="14" width="14" ALT=""></td>

                    <td rowspan="2" width=2><img src="../../assets/images/spacer.gif" alt="" height="1" width="2"></td>



					<td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_l.gif" height="14" width="14" ALT=""></td>

                    <td nowrap rowspan="2" class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt="" height="3" width="3"><br/><a href="/jeugd/index.html" target="_top"><span class="tabName">Jeugd</span></a></td>

                    <td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_r.gif" height="14" width="14" ALT=""></td>

                    <td rowspan="2" width=2><img src="../../assets/images/spacer.gif" alt="" height="1" width="2"></td>



					<td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_l.gif" height="14" width="14" ALT=""></td>

                    <td nowrap rowspan="2" class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt="" height="3" width="3"><br/><a href="/links/index.php" target="_top"><span class="tabName">Links</span></a></td>

                    <td valign="top"><img src="../../assets/images/tabcorners/re_99CCFF_r.gif" height="14" width="14" ALT=""></td>

                    <td rowspan="2" width=2><img src="../../assets/images/spacer.gif" alt="" height="1" width="2"></td>

				</tr>

				<tr>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="activeSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="activeSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

					<td class="inactiveSpacer"><img src="../../assets/images/spacer.gif" alt=""></td>

				</tr>

			</table>

		</td>

	</tr>

	<tr>

		<td width="100%" bgcolor="#FFFFFF" colspan="13"><img border="0" width="30" src="../../assets/images/FFFFFF.gif" height="12" alt=""></td>

	</tr>

</table>



<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0" bgcolor="#FFFFFF">

	<tr>

		<td id="leftFiller" valign="top" height="100%" rowspan="3" bgcolor="#666666">

			<table border="0" cellpadding="0" cellspacing="0" height="100%" width="8px">

				<tr><td>&nbsp;</td></tr>

			</table>

		</td>

		<td id="header" valign="top" width="100%">

			<table border="0" width="100%" cellpadding="3" cellspacing="0" bgcolor="#10425b">
                <tr>
                    <td bgcolor="#666666" width="40%">
                        <?php include("inc_title.html"); ?>
                    </td>
                    <td bgcolor="#666666" align="right" valign="top">&nbsp;
                          <span class="headerSmall">Huidige versie PLAYER.DBF: <?=CURRENT_PLAYER_DBF?>
                        <?php
                        if (isset($user) && $user->club_id == 100) {
                        ?>
                        <br/>
                        <a class="headerSmall" href="import_player.php">laad andere versie</a>
                        <?php
                        }
                        ?>
                        </span>
                    </td>
                </tr>
            </table>
            <table align="center" border="0" width="100%" height="90%" cellpadding="0" cellspacing="0" style="border-top:#BCDD10 4px solid;">
                <tr>
                    <?php include("inc_sublinks.php"); ?> 
                </tr>

				<tr><td colspan="2" nowrap bgcolor="#BCDD10" height="4"><img src="../../assets/images/spacer.gif" alt="" height="1" width="1"></td></tr>

				<tr>

					<td>&nbsp;</td>

					<td valign="top">

						<table align="left" cellspacing="10" width="100%">

							<tr>

								<td>

                                <span class="blackHeaderLarge">Zilveren Toren 2007</span>

								<br>&nbsp;<br>

								<span class="headerMedium" style="color:#993366">A. Resultaten</span>

                                <br>

                                Het <a href="/documents/zt2007.doc" target="_self">invulformulier</a> dient elke ploeg door te mailen per ronde naar <a href="mailto:medewerker-tornooileider@schaakliga-antwerpen.info">medewerker-tornooileider@schaakliga-antwerpen.info</a>.

                                <ul>

								<li class="quicklink"><a href="2007/zt1.html">Afdeling 1</a></li>

								<li class="quicklink"><a href="2007/zt2A.html">Afdeling 2A</a></li>

								<li class="quicklink"><a href="2007/zt2B.html">Afdeling 2B</a></li>

								<li class="quicklink"><a href="2007/zt3A.html">Afdeling 3A</a></li>

								<li class="quicklink"><a href="2007/zt3B.html">Afdeling 3B</a></li>

								</ul>

                                <?php

                                	if (isset($user) && $user->club_id != 100 ) {

                                        mysql_connect(DB_SERVER, DB_USER, DB_PWD);

	                				    mysql_select_db(DB_CATALOG);

                                        /*$result = mysql_query("SELECT clubname from club where club_id = ".$user->club_id);

        	                            $row = mysql_fetch_assoc($result);

	                                    $clubname = $row['clubname'];

	                                    mysql_free_result($result);

	                                    $result = mysql_query("SELECT comments from zt_team where club_id = ".$user->club_id);

	                                    $row = mysql_fetch_assoc($result);

	                                    $clubComment = $row['comments'];*/

                                ?>

	                                    <!--<span class="headerMedium" style="color:#993366">A.1. Eventuele wensen voor <?=$clubname?></span>

	                                    <br>&nbsp;<br>

	                                    U kan hier kenbaar maken of er bepaalde wensen zijn die uw club heeft. Deze informatie wordt voor de

	                                    ligatornooileider gecentraliseerd, hij zal trachten zoveel mogelijk rekening te houden met uw opmerkingen

	                                    bij het opmaken van de kalender.

	                                    <br>&nbsp;<br>

	                                    <textarea name="comment" rows="6" cols="130" onblur="storeClubComment(this.value, <?=$user->club_id?>, '')"><?=$clubComment?></textarea>

	                                    <br>&nbsp;<br>

	                                    <?php

                                        if (empty($clubComment) == true) {

                                        ?>

                                        <a href="zt.php"><img src="../../assets/images/24x24/shadow/lightbulb.gif" border="0" alt="Stuur door naar tornooileider" />

                                        <?php

                                        } else {

	                                    ?>

                                        <a href="zt.php"><img src="../../assets/images/24x24/shadow/lightbulb_on.gif" border="0" alt="Stuur door naar tornooileider" />

                                        <?php

                                        }

                                        ?>

	                                    &nbsp;&nbsp;Wijzig</a>

	                                    <br>&nbsp;<br>-->

                                <?php

                                	} else if (isset($user) && $user->club_id == 100) {

                                        //mysql_connect(DB_SERVER, DB_USER, DB_PWD);

	                				    //mysql_select_db(DB_CATALOG);

                                        //$result = mysql_query("select c.club_id, c.clubname, comments from zt_team t join club c on c.club_id =

	                                        //t.club_id group by club_id order by club_id");

	                        	?>

                                        <!--<span class="headerMedium" style="color:#993366">A.1. Eventuele wensen</span>

	                                    <br>&nbsp;<br>

                                        <table width="95%" border="0" cellpadding="2" cellspacing="0" class="solidYellowBox">-->

	                        	<?php

	                                    //while ($row = mysql_fetch_assoc($result)) {

                                ?>

                                            <!--<tr>

                                            	<td valign="top" width="5%" style="border-right:1px solid #A6C218;border-bottom:1px solid #A6C218;">&nbsp;&nbsp;<?=$row['club_id']?></td>

	                                            <td valign="top" width="30%"  style="border-right:1px solid #A6C218;border-bottom:1px solid #A6C218;">&nbsp;&nbsp;<?=$row['clubname']?></td>

	                                            <td valign="top" style="border-bottom:1px solid #A6C218;">&nbsp;&nbsp;<?=$row['comments']?></td>

	                                        </tr>-->

                                <?php

                                        //}

                            	?>

                                        <!--</table>-->

                            	<?php

                                    }

								?>

								<span class="headerMedium" style="color:#993366">B. Spelerslijsten</span>

								<br>

								Hier kan u online de spelerslijst van elke deelnemende club raadplegen.<br>

								Deze lijsten zijn 24/7 beschikbaar en geven telkens de laatste aanpassingen weer.<br>

								Een must voor elke ploegleider.

								<ul>

								<li><a href="view_players_list.php">Overzicht spelerslijsten</a></li>

								</ul>

								<span class="headerMedium" style="color:#993366">C. Kalender</span>

								<br>

								<a href="/documents/kalenderzilverentoren2007-1.pdf" target="_self">Afdeling 1</a>,

								<a href="/documents/kalenderzilverentoren2007-2a.pdf" target="_self">Afdeling 2A</a>,

								<a href="/documents/kalenderzilverentoren2007-2b.pdf" target="_self">Afdeling 2B</a>,

								<a href="/documents/kalenderzilverentoren2007-3a.pdf" target="_self">Afdeling 3A</a>,

								<a href="/documents/kalenderzilverentoren2007-3b.pdf" target="_self">Afdeling 3B</a>

								<!--<ul>

								<li><a href="insert_calendar.php">Invoer</a></li>

								</ul>-->

                                <br>&nbsp;<br>

								<span class="headerMedium" style="color:#993366">D. Contactinfo</span>

                                <br>

                                Alle contactinformatie van de deelnemende clubs vindt u hier.<br/> Gegevens kunnen op elk moment

                                aangepast worden door de ploegleider.

                                <?php

                                	if (isset($user) && $user->club_id != 100) {

                                ?>

                                <br/>Uw contactinfo is aanpasbaar via de link <em>Wijzig uw gegevens</em>. Indien u dit nog niet heeft gedaan,

                                gelieve dit zo spoedig mogelijk in te vullen.

                                <?php

                                	}

                                ?>

								<ul>

                                <li><a href="zt_clubs.php">Overzicht contactinfo</a></li>

                                <?php

                                	if (isset($user) && $user->club_id != 100) {

                                ?>

								<li><a href="edit_club_info.php">Wijzig uw gegevens</a></li>

                                <?php

                                	}

                                ?>

								</ul>



								<!--<ul>

								<li><a href="insert_round.php">Invoer</a></li>

								</ul>-->

                                <?php

                                    $archiveLetter = "E";

                                	if (isset($user)) {

                                		$archiveLetter = "F";

                                ?>

                                <span class="headerMedium" style="color:#993366">D. FAQ</span>

                                <br>

                                Omwille van enkele gekende problemen bij het beheren van de spelerslijsten, is er nu een FAQ

                                beschikbaar. Kijk dus eerst eens hier of er een mogelijke oplossing voor uw probleem uitgelegd

                                staat vooraleer u de webmaster contacteert.

                                <ul>

                                <li><a href="faq.php">Frequently Asked Questions</a>

                                </ul>

                                <?php

                                	}

                                ?>

								<span class="headerMedium" style="color:#993366"><?=$archiveLetter?>. Archief</span>

								<br>

								De resultaten van ZT 2006 kan u hier steeds raadplegen, nuttig voor clubs om te weten in welke

								afdeling ze hun ploegen mogen inschrijven.

                                <ul>

                                <li><a href="../zt-index.html" target="_blank">ZT 2006</a>

                                </ul>

								</td>

							</tr>

						</table>

					</td>

				</tr>

				<tr>

			</table>

		</td>

	</tr>

</table>



</body>

</html>

